import androidx.compose.desktop.ui.tooling.preview.Preview
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.*
import androidx.compose.material.Button
import androidx.compose.material.MaterialTheme
import androidx.compose.material.Text
import androidx.compose.material.TextField
import androidx.compose.runtime.Composable
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color

import androidx.compose.ui.unit.dp
import androidx.compose.ui.window.*


fun main() = application {
    Window(
        onCloseRequest = ::exitApplication,
        title = "Compose for Desktop",
        state = rememberWindowState(width = 300.dp, height = 300.dp)
    ) {
        MaterialTheme {
            Column {
                TitleBar()
                MyMenuBar()
                MyContent()
                MyStateBar()
            }
        }
    }
}


@Composable
fun MyMenuBar() {


}

@Composable
fun MyContent() {
   Text("This is a content")
}


@Composable
fun MyStateBar() {
    Text("This is a stateBar",modifier = Modifier.padding(4.dp)
    )
}


@Composable
fun TitleBar() {

        Row(modifier = Modifier
            .background(Color.Blue)
            .height(48.dp)
            .fillMaxWidth()) {
            Button(modifier = Modifier
                .background(Color.Transparent)
                .align(Alignment.CenterVertically,),
                onClick = {
                }) {
                Text("File")
            }
            Button(modifier = Modifier

                .background(Color.Transparent)
                .align(Alignment.CenterVertically),
                onClick = {


                }) {
                Text("Edit")
            }

        }




}

